<?php

class sfGuardFormSignin extends sfForm
//class sfGuardFormSignin extends reCaptchaForm
{
  public function configure()
  {
    $this->setWidgets(array(
      'username' => new sfWidgetFormInput(),
      'password' => new sfWidgetFormInput(array('type' => 'password')),
      'remember' => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'username' => new sfValidatorString(),
      'password' => new sfValidatorString(),
      'remember' => new sfValidatorBoolean(),
    ));

    $this->validatorSchema->setPostValidator(new sfGuardValidatorUser());

    $this->widgetSchema->setNameFormat('signin[%s]');
    //etiquetas
    $this->widgetSchema->setLabel('username', 'Usuario');
    $this->widgetSchema->setLabel('password', 'Contraseña');
    $this->widgetSchema->setLabel('remember', 'Recordar');

//    if (sfConfig::get('app_recaptcha_active', false))
//    {
//          $this->setWidget('response', new sfWidgetFormInput());
//          $this->validatorSchema->setPostValidator(
//            new sfValidatorSchemaReCaptcha('challenge', 'response')
//          );
//          $this->validatorSchema->setOption('allow_extra_fields', true);
//          $this->validatorSchema->setOption('filter_extra_fields', false);
//    }
    

  }
}
